package com.speakglobe.panelist.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
import javax.persistence.Column;
import javax.persistence.ManyToOne;
import javax.persistence.JoinColumn;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Parent Entity class for E-Wallet which has wallet_type column 
 * which will be automatically differentiate child entities by the DiscriminatorColumn.
 * 
 * @author ronnie
 *
 */
@Entity
@Table (name = "statement")
public class Statement implements Serializable {
	
	private static final long serialVersionUID = 1815778728443749570L;

	@Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private int id;
	
	@ManyToOne
	@JoinColumn(name="e_wallet_id")
	private EWallet eWallet;
	
	private String statement;
	private double debit;
	private double credit;	
	
	@Column(name = "process_date")
	@Temporal(TemporalType.TIMESTAMP)
	private Date processDate;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public EWallet geteWallet() {
		return eWallet;
	}

	public void seteWallet(EWallet eWallet) {
		this.eWallet = eWallet;
	}

	public String getStatement() {
		return statement;
	}

	public void setStatement(String statement) {
		this.statement = statement;
	}

	public double getDebit() {
		return debit;
	}

	public void setDebit(double debit) {
		this.debit = debit;
	}

	public double getCredit() {
		return credit;
	}

	public void setCredit(double credit) {
		this.credit = credit;
	}

	public Date getProcessDate() {
		return processDate;
	}

	public void setProcessDate(Date processDate) {
		this.processDate = processDate;
	}
	
}
